set parametric
set isosamples 40, 20
set terminal pdfcairo enhanced

a = system("cat dimension.txt | sed -n '1p'")
b = system("cat dimension.txt | sed -n '2p'")
c = system("cat dimension.txt | sed -n '3p'")

# 定义椭球在x、y、z方向上的偏移量
dx = 0
dy = 0
dz = 0

# 计算椭球表面上每个点的坐标
# 注意：这里使用参数方程描述椭球曲线
x(u,v) = a*cos(u)*cos(v) + dx
y(u,v) = b*cos(u)*sin(v) + dy
z(u,v) = c*sin(u) + dz

set urange [0:2*pi]
set vrange [0:pi]

set xlabel "X"
set ylabel "Y"
set zlabel "Z"


set output "plot.pdf"

splot x(u,v), y(u,v), z(u,v) with lines notitle
